<?php

namespace App\Traits;

use Illuminate\Http\Response;
use Symfony\Component\HttpFoundation\Response as ResponseAlias;

trait Reply
{
    protected function success($code = 0, $data = array(), $msg = 'success', $status = ResponseAlias::HTTP_OK)
    {
        return Response::success($code, $data, $msg, $status);
    }

    protected function failed($msg = 'failed', $status = ResponseAlias::HTTP_BAD_REQUEST)
    {
        return Response::failed($msg, $status);
    }

    protected function noContent($headers = array())
    {
        return Response::noContent($headers);
    }
}
